<template>
  <div id="zt_box" :style="{height: height}" @touchstart="start($event)" @touchmove="move($event)">
      <LSlide :data="data" :border="true"/>
      <router-view/>
  </div>
</template>
<script>
import LSlide from "./public/LSlide";
export default {
  data() {
    return {
      data: {
        simple: true,
        items: [
          {
            name: "资讯首页",
            url: "/news/"
          },
          {
            name: "合规税筹",
            url: "/news/shuichou/"
          },
          {
            name: "社保公积金",
            url: "/news/shebao/"
          },
          {
            name: "残疾人就业",
            url: "/news/103/"
          },
          {
            name: "赚钱",
            url: "/news/109/"
          }
        ]
      },
      height: document.body.clientHeight + "px",
      clientY: 0
    };
  },
  components: {
    LSlide
  },
  methods: {
    start(e) {
      this.clientY = e.touches[0].clientY;
    },
    move(e) {
      if (this.clientY > e.touches[0].clientY) {
        this.$emit("order", {
          target: "title",
          type: 0
        });
      }
    }
  },
  activated() {
    this.$parent.tState = 1;
    this.$parent.fState = 0;
    this.$parent.updata();
  }
};
</script>
<style scoped>
#zt_box {
  overflow: scroll;
  width: 100%;
}
</style>
